import org.springframework.boot.Banner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * class
 *
 * @author ai-indeed
 * @date 2020/06/05
 */
@SpringBootApplication
@EnableScheduling
@EnableAsync
//@EnableDiscoveryClient
//@EnableFeignClients
public class ChatMessageApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {

        ConfigurableApplicationContext run = configureApplication(new SpringApplicationBuilder()).run(args);

    }

    private static SpringApplicationBuilder configureApplication(SpringApplicationBuilder builder) {
        return builder.sources(ChatMessageApplication.class).bannerMode(Banner.Mode.CONSOLE);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return configureApplication(builder);
    }
}
